package br.com.intelsys.crawler;

import edu.uci.ics.crawler4j.crawler.Page;
import edu.uci.ics.crawler4j.crawler.WebCrawler;
import edu.uci.ics.crawler4j.url.WebURL;

public class GuardWebCrawler extends WebCrawler {
	private ControllerData getControllerData() {
		return (ControllerData) myController.getCustomData();
	}

	@Override
	public boolean shouldVisit(WebURL webUrl) {
		return getControllerData().shouldVisit(webUrl);
	}

	@Override
	public void visit(Page page) {
		getControllerData().pageFound(page);
	}

}
